<?php
// Error reporting
error_reporting(E_ALL ^ E_NOTICE);

/**********************************************
 * 
 * Access-Status configuration
 * 
 **********************************************/
define("STATUS_ADMIN_SCHREIBEN",         1);

define("STATUS_MITARBEITER_SCHREIBEN",   2);
define("STATUS_MITARBEITER_FREIGABEN",   3);
define("STATUS_MITARBEITER_LESEN",       4);

define("STATUS_ZENTRALE_UEBERWACHEN",    5);
define("STATUS_BEZIRK_UEBERWACHEN",      6);
define("STATUS_FILIALE_UEBERWACHEN",     7);


define("STATUS_FREIGABE", 1);
define("STATUS_VORMERKEN", 2);

define("STATUS_FREIGABE_TEXT", "Freigegeben");
define("STATUS_VORMERKEN_TEXT", "Zur Freigabe vorgemerkt");
define("STATUS_VORMERKEN_EIGENER_TEXT", STATUS_VORMERKEN_TEXT . " (selbst vorgemerkt)");
define("STATUS_USER_PASSWORT_EINGABE", "User muss neues Passwort eingeben");

define("RECHT_ADMIN_SCHREIBEN",         1);

define("RECHT_MITARBEITER_LESEN",       2);
define("RECHT_MITARBEITER_SCHREIBEN",   3);
define("RECHT_MITARBEITER_FREIGABEN",   4);

define("RECHT_FILIALE_UEBERWACHEN",     5);
define("RECHT_BEZIRK_UEBERWACHEN",      6);
define("RECHT_ZENTRALE_UEBERWACHEN",    7);



/**********************************************
 * 
 * PATH
 * 
 **********************************************/
define("APP_PATH", "http://localhost/KSSystem/");

/**********************************************
 * 
 * Session configuration
 * 
 **********************************************/
session_start();
ob_start();

/**********************************************
 * 
 * Including major classes
 * 
 **********************************************/
require_once("class/factory/class.factory.php");
require_once("class/singleton/class.singleton.php");
require_once("class/user/class.userAuth.php");

/**********************************************
 * 
 * Include miscellaneous
 * 
 **********************************************/
require_once("functions.php");
require_once("title.php");

/**********************************************
 * 
 * Database configuration
 * 
 **********************************************/
$connArgs = array(
					"mysql:host=localhost;dbname=kssystem", // Connection
					"kssystem", 							// User
					"foobar",									// Password
					array()								// Options
				);
				
// Connection handle
$sql = CSingleton::get("sql::sql", $connArgs);

// Set db-charset to utf8
$sql->query("SET NAMES utf8");
$sql->query("SET CHARACTER SET utf8");
?>